package net.zzy.pbbot.util;

import org.springframework.stereotype.Component;

/**
 * @author zhuZhaoYang
 * @date 2021/9/24 16:21
 */
@Component
public class CqUtil {

    public static String getJsonCq(String content) {
        content = content.replaceAll(",", "&#44;")
                .replaceAll("&", "&amp;")
                .replaceAll(" \\[","&#91;")
                .replaceAll("]","&#93;");
        return "[CQ:json,data=" + content + "]";
    }
}
